﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Default.master" AutoEventWireup="true" CodeBehind="OrderConfirm.aspx.cs" Inherits="Runda.EShop.Web.Order.OrderConfirm" %>
<%@ Register Src="~/UserControl/OrderInfo.ascx" TagPrefix="uc" TagName="OrderInfo" %>

<%@ Register Assembly="Runda.EShop.Common.Component" Namespace="Runda.EShop.Common.Component"
    TagPrefix="cc1" %>
<%@ Register Src="~/UserControl/OrderMenu.ascx" TagPrefix="uc" TagName="OrderMenu" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphLeft" runat="server">
    <uc:OrderMenu runat="server" ID="ucOrderMenu" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
   <div class="i_tablebt_xian" style="margin: 10px 0px 0px 0px; width: 100%;">
        <span class="l"><img src="<%=ResolveUrl("~/images/ico/down_16x16.gif")%>" align="absmiddle" />订单信息</span>
    </div>
<uc:OrderInfo runat="server" ID="ucOrderInfo" />
    <div class="i_tablebt_xian" style="margin: 10px 0px 0px 0px; width: 100%;">
        <span class="l"><img src="<%=ResolveUrl("~/images/ico/down_16x16.gif")%>" align="absmiddle" />订单批次确认</span>
    </div>
    <div class="clear"></div>
    <div style="margin-top: 10px; margin-left: 25px; width: 93%;">
        <div class="huang_box">
            <img src="/images/ico/ani_light.gif" align="absmiddle" />
            <span>请逐行确认批次数量，然后提交总订单。如果不订购此批次号产品，请填写"0"值。</span>
        </div>
    </div>
    <div class="clear"></div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
    <ContentTemplate>
    <asp:GridView ID="gvOrderPatch" runat="server" AutoGenerateColumns="False" OnRowDataBound="gvOrderPatch_RowDataBound">
        <Columns>
            <asp:BoundField DataField="ProductCode" HeaderText="产品编号" />
            <asp:BoundField DataField="ProductName" HeaderText="产品名称" />
            <asp:BoundField DataField="BatchCode" HeaderText="批次号" />
            <asp:BoundField DataField="DueDate" HeaderText="有效期" DataFormatString="{0:yyyy-MM-dd}" />
            <asp:BoundField DataField="AssignQty" HeaderText="分配数量" DataFormatString="{0:N}" />
            <asp:TemplateField HeaderText="确认数量">
                <ItemTemplate>
                    <cc1:DecimalTextBox ID="txtActualQty" runat="server" Text='<%# string.Format("{0:N}",Eval("ActualQty")) %>' Width="60px"></cc1:DecimalTextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="ConfirmStatus" HeaderText="状态" />
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <asp:HiddenField ID="txtAssignQty" runat="server" Value='<%# Eval("AssignQty") %>'/>
                    <asp:Button ID="btnConfirm" runat="server" Text="确认" CommandName="confirm" CommandArgument='<%# Eval("ID") %>' OnClick="btnConfirm_Click"/>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>    
    </ContentTemplate>
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="btnSave" />
    </Triggers>
    </asp:UpdatePanel>
    <div class="i_tablebt_xian" style="margin: 10px 0px 0px 0px; width: 100%;"></div>
 <div class="banner7 r">
        <asp:LinkButton ID="btnSave" runat="server" onclick="btnSave_Click" ClientIDMode="Static" OnClientClick="return confirm('订单确认提交后不能修改，确认提交订单吗？');">提交</asp:LinkButton>
</div> 
</asp:Content>
